import 'package:lib_http/lib_http.dart';

class HeaderInterceptor extends Interceptor {

  final Map<String, dynamic> commonHeader;

  HeaderInterceptor(this.commonHeader);

  @override
  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
    var headers = options.headers;
    headers.addAll(commonHeader);
    super.onRequest(options, handler);
  }
}